package cn.edu.scau.cmi.luochenghao.chapter04;

import java.util.Scanner;
import java.util.Arrays;

public class ShuZuPaiXu {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.print("请输入数组成员个数:");
		int n = input.nextInt();
		int[] numbers = new int[n];
		System.out.print("请输入数组成员:");
		for (int i = 0; i<numbers.length; i++) {
			n=input.nextInt();
			numbers[i] = n;
		}
		System.out.println("排序前：" + Arrays.toString(numbers));
		Arrays.sort(numbers);
		System.out.println("排序后：" + Arrays.toString(numbers));
	}
}